<template>
    <div>
        <ul class="mui-table-view">
				<li class="mui-table-view-cell mui-media">
					<router-link :to="'/newsList/detail/'+item.id" v-for="item in list" :key='item.id'>
						<img class="mui-media-object mui-pull-left"
                         :src="item.thumbnailUrl">
						<div class="mui-media-body">
							<h3>{{item.title}}</h3>   
							<p class='mui-ellipsis'>
                                <span>发表时间：{{item.albumId}}</span>
                                <span>点击：{{item.id}}次</span>
                            </p>
						</div>
					</router-link>
				</li>
				
			</ul>
    </div>
</template>
<script>
export default {
    data(){
        return{
            list:[]
        }
    },
    created(){
        this. getnews()
    },
    methods:{
        getnews(){
            this.$http.get('http://jsonplaceholder.typicode.com/photos').then(result=>{
                this.list=result.body.slice(0,20)
            })
        }
    }
}
</script>
 <style  scoped>
   h3{
       font-size: 14px;
   }
   .mui-ellipsis{
       font-size: 12px;
       color: #226aff;
       display:flex;
       justify-content: space-between;
   }



</style>
